package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ZhuChunXiao on 2017/7/17.
 * 用工信息
 */
@Entity
@Table(name="ec_personneluse")
public class PersonnelUse extends BaseFlowEntity {
    private static final long serialVersionUID = -5997023124752092006L;
    /**
     * 人事信息表
     */
    private PersonnelInfo personnelInfo;
    /**
     * 用人性质 1正式 2试用
     */
    private int nature;
    /**
     * 薪资
     */
    private Double salary;
    /**
     * 合同开始日期
     */
    private Date contractDateStart;
    /**
     * 合同结束日期
     */
    private Date contractDateEnd;
    /**
     * 试用开始日期
     */
    private Date trialDateStart;
    /**
     * 试用结束日期
     */
    private Date trialDateEnd;
    /**
     * 关联用户的ID（quartz中用到的）
     */
    private String userId;
    /**
     * 此用户关联的人事专员ID（quartz中用到的）
     */
    private String personnelUserString;
    /**
     * 关联的人事信息表（quartz中用到的）
     */
    private String personnelInfoId;

    @OneToOne(fetch = FetchType.LAZY)
    public PersonnelInfo getPersonnelInfo() {
        return personnelInfo;
    }

    public void setPersonnelInfo(PersonnelInfo personnelInfo) {
        this.personnelInfo = personnelInfo;
    }

    public int getNature() {
        return nature;
    }

    public void setNature(int nature) {
        this.nature = nature;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Date getContractDateStart() {
        return contractDateStart;
    }

    public void setContractDateStart(Date contractDateStart) {
        this.contractDateStart = contractDateStart;
    }

    public Date getContractDateEnd() {
        return contractDateEnd;
    }

    public void setContractDateEnd(Date contractDateEnd) {
        this.contractDateEnd = contractDateEnd;
    }

    public Date getTrialDateStart() {
        return trialDateStart;
    }

    public void setTrialDateStart(Date trialDateStart) {
        this.trialDateStart = trialDateStart;
    }

    public Date getTrialDateEnd() {
        return trialDateEnd;
    }

    public void setTrialDateEnd(Date trialDateEnd) {
        this.trialDateEnd = trialDateEnd;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Column(length = 500)
    public String getPersonnelUserString() {
        return personnelUserString;
    }

    public void setPersonnelUserString(String personnelUserString) {
        this.personnelUserString = personnelUserString;
    }

    public String getPersonnelInfoId() {
        return personnelInfoId;
    }

    public void setPersonnelInfoId(String personnelInfoId) {
        this.personnelInfoId = personnelInfoId;
    }

}
